home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ssssyyyymmmmmmmmoooonnnn((((1111MMMM)))) ssssyyyymmmmmmmmoooonnnn((((1111MMMM))))
-
-
-
- NNNNAAAAMMMMEEEE
- symmon - kernel symbolic debugger
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _s_y_m_m_o_n is a standalone program used to debug the kernel. It is intended
- to be used only by those involved in writing and debugging device drivers
- or other parts of the kernel. The implementation of _s_y_m_m_o_n is machine
- dependent and the commands and functionality described here may not apply
- to all systems.
-
- To use _s_y_m_m_o_n, several steps must be taken to prepare the system:
-
- 1. _s_y_m_m_o_n must be manually installed by the user, because it is not
- installed on the system as shipped from the factory. This can be
- done by installing the ``Debugging Kernels'' subsystem in the IDO
- software development option.
-
- 2. Alterations must be done to the file /_v_a_r/_s_y_s_g_e_n/_s_y_s_t_e_m/_i_r_i_x._s_m to
- build a kernel capable of being debugged; see the comments in that
- file for details.
-
- 3. The program _s_e_t_s_y_m(1M) needs to be run on the newly generated kernel
- to allow _s_y_m_m_o_n to recognize symbols in it.
-
- 4. _s_y_m_m_o_n needs to be installed in the volume header of the root drive
- with _d_v_h_t_o_o_l(1M). This normally happens as part of the software
- installation process.
-
- _s_y_m_m_o_n is typically used with a terminal as the system console (see
- _p_r_o_m(1M) for information on how to enable a terminal as the console).
- When a debug kernel is booted, it automatically tries to load _s_y_m_m_o_n from
- the same source. _s_y_m_m_o_n can be booted from an alternate device by
- setting the ddddbbbbggggnnnnaaaammmmeeee environment variable in the prom. For example:
-
- _ssss_eeee_tttt_eeee_nnnn_vvvv _dddd_bbbb_gggg_nnnn_aaaa_mmmm_eeee _ssss_cccc_ssss_iiii_((((_1111_))))_dddd_iiii_ssss_kkkk_((((_1111_))))_rrrr_dddd_iiii_ssss_kkkk_((((_0000_))))_pppp_aaaa_rrrr_tttt_iiii_tttt_iiii_oooo_nnnn_((((_8888_))))_ssss_yyyy_mmmm_mmmm_oooo_nnnn
-
- loads _s_y_m_m_o_n from a disk 1, connected to SCSI controller 1.
-
- Once _s_y_m_m_o_n is loaded, the system operates normally until _s_y_m_m_o_n is
- triggered by the keyboard or an exceptional condition happens in the
- kernel that causes it to enter the debugger automatically. To enter
- _s_y_m_m_o_n from the keyboard, type a <Ctrl-a>. _s_y_m_m_o_n prompts with DDDDBBBBGGGG:::: and
- accepts commands described below.
-
- BBBBuuuuiiiilllltttt----iiiinnnn CCCCoooommmmmmmmaaaannnnddddssss
- _s_y_m_m_o_n has a set of basic commands for setting and clearing breakpoints
- and examining system state. Not all of the commands listed below are
- supported on all systems. Some commands take memory addresses as
- arguments. Addresses can be given directly in decimal, in hex if
- preceded by 0000xxxx, in binary if preceded with 0000bbbb, as names of functions or
- data, as names of registers if preceded by $$$$, or as a combination of
- those with ++++ and ----. Some commands take a range of addresses specified as
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- ssssyyyymmmmmmmmoooonnnn((((1111MMMM)))) ssssyyyymmmmmmmmoooonnnn((((1111MMMM))))
-
-
-
- either _A_D_D_R::::_A_D_D_R for an inclusive range or _A_D_D_R####_C_O_U_N_T for a count of
- _C_O_U_N_T starting at _A_D_D_R. Commands are listed below:
-
- bbbbrrrrkkkk [_A_D_D_R]
- Set a breakpoint at the given address. If no arguments are given,
- the set of current breakpoints is listed.
-
- bbbbtttt [_M_A_X__F_R_M]
- Print a stack back trace of up to _M_A_X__F_R_M frames. See the
- discussion about uuuubbbbtttt below for an alternate form of stack back
- trace.
-
- cccc Continue execution from a breakpoint.
-
- ccccaaaacccchhhheeeefffflllluuuusssshhhh [_R_A_N_G_E]
- Flush both the instruction and data caches over the range of address
- given.
-
- ccccaaaallllcccc
- ccccaaaallllllll _A_D_D_R [_A_R_G_L_I_S_T]
- Set up a stack frame and call the procedure at the specified
- address.
-
- cccclllleeeeaaaarrrr
- Clear the screen.
-
- ddddiiiissss [_R_A_N_G_E]
- Disassemble instructions in memory over the range specified.
-
- dddduuuummmmpppp [----bbbb|----hhhh|----wwww|----dddd] [----oooo|----tttt|----xxxx|----cccc] _R_A_N_G_E
- Dump the contents of memory. The ----bbbb, ----hhhh, ----wwww and ----dddd flags can be
- used to specify byte, halfword, word or double word data. The ----oooo,
- ----tttt, ----xxxx, and ----cccc flags can be used to specify octal, decimal,
- hexadecimal, or ASCII data formats.
-
- The specified range of memory to dump can take these forms:
-
- +o _b_a_s_e for a single location
-
- +o _b_a_s_e####_c_o_u_n_t for _c_o_u_n_t locations starting at _b_a_s_e
-
- +o _b_a_s_e::::_l_i_m_i_t for locations whose addresses are greater than or
- equal to _b_a_s_e but less than _l_i_m_i_t
-
- gggg [----bbbb|----hhhh|----wwww] [_A_D_D_R|$_r_e_g_n_a_m_e]
- Get and display the contents of memory at the address given. If a
- register name is given, its contents are displayed at the time the
- kernel was stopped.
-
- ggggoooottttoooo _A_D_D_R
- Continue execution until the given address or a breakpoint is
- reached. This is a short hand way to set a breakpoint at an
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- ssssyyyymmmmmmmmoooonnnn((((1111MMMM)))) ssssyyyymmmmmmmmoooonnnn((((1111MMMM))))
-
-
-
- address, continue, and then remove that breakpoint.
-
- hhhheeeellllpppp List a short summary of the built-in commands.
-
- hhhhxxxx _N_A_M_E
- The symbol table is searched for entries matching _N_A_M_E, and if one
- is found, its value is printed.
-
- kkkkpppp [_K_P_N_A_M_E]
- Kernel print command. If no arguments are given, a list of the
- available kernel print commands is given. If a name is given, that
- print function is executed. See the discussion on kernel print
- commands below for more information.
-
- llllkkkkaaaaddddddddrrrr _A_D_D_R
- The given address is matched against the symbol table and the
- symbols near it are listed.
-
- llllkkkkuuuupppp _S_T_R_I_N_G
- The given string is matched against the symbol table and any symbol
- with an equal or longer name is printed. This is convenient when
- you cannot remember the precise symbol name.
-
- mmmmssssyyyymmmmssss _I_D
- Print dynamically loaded kernel module's symbols. The module id is
- found using either the _l_b_o_o_t ----VVVV command or the _m_l lllliiiisssstttt command. See
- the _m_l_o_a_d(4) manual page for more information.
-
- nnnnmmmm _A_D_D_R
- The address given is matched against the symbol table and if an
- exact match is found, the symbolic name is printed. This is a more
- restrictive version of the llllkkkkaaaaddddddddrrrr command described above.
-
- pppp [----bbbb|----hhhh|----wwww] _A_D_D_R _V_A_L_U_E
- Put the value given into the address given. This causes a write to
- memory.
-
- pppprrrriiiinnnnttttrrrreeeeggggssss
- List the contents of the general purpose registers when the kernel
- was stopped.
-
- qqqquuuuiiiitttt Restart the PROM.
-
- ssss [_C_O_U_N_T]
- Single step the kernel for either one instruction or the given
- count. If the current instruction is a branch, then both it and the
- following instruction are executed. The next unexecuted instruction
- is disassembled when the command completes. After a sssstttteeeepppp command is
- issued, _s_y_m_m_o_n enters a command repeat mode where a null command
- causes another step to be taken. This repeat mode is indicated by a
- change to the prompt.
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- ssssyyyymmmmmmmmoooonnnn((((1111MMMM)))) ssssyyyymmmmmmmmoooonnnn((((1111MMMM))))
-
-
-
- SSSS [_C_O_U_N_T]
- Same as the sssstttteeeepppp command above, except that jump-and-link
- instructions are stepped over.
-
- ttttllllbbbbdddduuuummmmpppp [_R_A_N_G_E]
- List the contents of the translation lookaside buffer. If
- specified, the range of TLB entries given is listed. The range
- should specify a subset of the 64 TLB slots.
-
- ttttllllbbbbfffflllluuuusssshhhh [_R_A_N_G_E]
- Flush the TLB over the range of entries given or the entire TLB if
- no range is specified.
-
- ttttllllbbbbmmmmaaaapppp [----iiii _I_N_D_E_X] [----nnnn|----dddd|----gggg|----vvvv] _V_A_D_D_R _P_A_D_D_R
- Inserts an entry in the TLB that maps the virtual address given by
- _V_A_D_D_R to the physical address given by _P_A_D_D_R. If specified, the TLB
- slot given by _I_N_D_E_X is used. The ----nnnn, ----dddd, ----gggg, and ----vvvv flags can be
- used to turn on the non-cached, dirty, global, and valid bits. The
- current TLB context number is used.
-
- ttttllllbbbbppppiiiidddd [_P_I_D]
- Get or set the current TLB context number. If no argument is given,
- the current TLB context number is returned; otherwise, the context
- number is set to the argument.
-
- ttttllllbbbbppppttttoooovvvv _P_A_D_D_R
- Display TLB entries that map a virtual address to the physical
- address given.
-
- ttttllllbbbbvvvvttttoooopppp _V_A_D_D_R [_P_I_D]
- Find the physical address mapped to the virtual address given by
- _V_A_D_D_R. If _P_I_D is given, then it is used as the TLB context number
- in the match; otherwise, the current TLB context number is used.
-
- uuuunnnnbbbbrrrrkkkk [_B_P_N_U_M]
- Remove the breakpoint with the breakpoint number given. The
- breakpoint number can by determined by listing the set breakpoints
- with the bbbbrrrrkkkk command.
-
- wwwwpppptttt [rrrr|wwww|rrrrwwww] [0000|_P_A_D_D_R]
- Set a read, write or read/write watch point at on physical address
- using the R4000 watch point registers. The address must be double
- word aligned, and the watch point trips on any access within the
- next eight bytes. An argument of 0 clears the watch point. Note
- that the R4000 only supports one watch point at a time.
-
- [_A_D_D_R]////[_C_O_U_N_T][dddd|DDDD|oooo|OOOO|xxxx|XXXX|XXXXXXXX|bbbb|ssss|cccc|iiii]
- Dump the contents of memory at the given address. This command
- functions in a similar manner as the _d_b_x(1) command of the same
- syntax. The XXXXXXXX is a _s_y_m_m_o_n specific extension to printing
- hexadecimal double words.
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-
-
-
- ssssyyyymmmmmmmmoooonnnn((((1111MMMM)))) ssssyyyymmmmmmmmoooonnnn((((1111MMMM))))
-
-
-
- KKKKeeeerrrrnnnneeeellll PPPPrrrriiiinnnntttt CCCCoooommmmmmmmaaaannnnddddssss
- The kernel extends the set of built-in _s_y_m_m_o_n commands with kernel print
- commands. These commands dump various kernel data structures.
-
- pppprrrroooocccc _P_R_O_C_I_N_D_E_X
- Dump the process structure associated with the given process table
- index. Note that the process table index is not the same as the
- IRIX process ID.
-
- uuuusssseeeerrrr _P_R_O_C_I_N_D_E_X
- Dump the contents of the user structure for the process with the
- process table index given.
-
- bbbbuuuuffff _B_U_F_N_U_M
- Dump the contents of a buffer structure. The address of the buffer
- to be dumped is controlled by the BBBBUUUUFFFFNNNNUUUUMMMM argument. If BBBBUUUUFFFFNNNNUUUUMMMM is a
- valid K0, K1, or K2 address, then the buffer at that address is
- displayed. If BBBBUUUUFFFFNNNNUUUUMMMM is a small integer, it is used as an index
- into the buffer table. If BBBBUUUUFFFFNNNNUUUUMMMM is equal to -1, summary
- information about the buffer pool is displayed.
-
- qqqqbbbbuuuuffff _D_E_V_I_C_E
- Dump the contents of buffers queued for the device given. The
- device argument is given as the major/minor device number of the
- desired device.
-
- ppppddddaaaa [_C_P_U_I_D]
- Dump the contents of the processor private data area for the
- processor ID given.
-
- rrrruuuunnnnqqqq Dump the run queue. A short summary of each process waiting for CPU
- time is listed.
-
- eeeeffffrrrraaaammmmeeee [_A_D_D_R]
- The exception frame at the given address is displayed. If the
- address is a small integer, the exception frame of the process with
- that process table index is used. The exception frame holds the
- contents of the general purpose registers at the time the process
- last executed.
-
- uuuubbbbtttt [_P_R_O_C_I_N_D_E_X]
- User process stack back trace. A stack back trace is listed for the
- process whose process table index is given.
-
- pppplllliiiisssstttt
- Process table list. This gives an output similar to _p_s(1) and can
- be used to find the process table index number for a process.
-
- ppppbbbb Dump console print buffer. The contents of the console print buffer
- are printed. This can be useful when an important message has
- scrolled off the screen.
-
-
-
-
- PPPPaaaaggggeeee 5555
-
-
-
-
-
-
- ssssyyyymmmmmmmmoooonnnn((((1111MMMM)))) ssssyyyymmmmmmmmoooonnnn((((1111MMMM))))
-
-
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- prom(1M).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 6666
-
-
-
-